*Use the "plausible_for_replication.dta" dataset  


*****Description of variables*****

*****Attribution 
*attribution=1 if respondent identifies the Sons of Freedom (SOF) as perpetrator (from a list including also an unspecified other terrorist organisation, the country from which SOF come, the target country, and an unspecified other country) and expresses being "somewhat confident" or "very confident" about it (as opposed to "not confident at all"). Otherwise, attribution=0


*****Own country
*own_country=1 if respondent is randomly assigned to a vignette where their own country is targeted. own_country=0 if respondent is assigned to vignette where another country is targeted


*****Unclaimed
*unclaimed=1 if respondent is randomly assigned to a vignette where the attack goes unclaimed. unclaimed=0 if respondent is randomlyassigned to a vignette where the attack is claimed by SOF


*****Anger
*anger=1 if respondent chose anger from the list of possible reactions as the term that better described how the respondent felt. Otherwise, anger=0. 


*****Fear
*fear=1 if respondent chose fear from the list the of possible reactions as the term that better described how the respondent felt. Otherwise, fear=0. 


*****Resignation
*resignation=1 if respondent chose resignation from the list of possible reactions as the term that better described how the respondent felt. Otherwise, resignation=0. 


*****Confusion
*confusion=1 if respondent chose confusion from the list of possible reactions as the term that better described how the respondent felt. Otherwise, confusion=0. 
*An alternative coding of confusion (confusion_alt) includes as instances of confusion five respondents that chose "other" as response, but whose own words about their reaction suggested confusion ("Need more information."; "Complicated to understand whatâs going on"; "In the dark.  Need more information to make a decision."; "Uninformed"; "puzzled").


*****Indifference
*indifference=1 if respondent chose indifference from the list of possible reactions as the term that better described how the respondent felt. Otherwise, indifference=0. 


*****Other
*other=1 if respondent chose "other" from the list of possible reactions as the term that better described how the respondent felt. Otherwise, other=0. 


*****Ideology
*ideology=1 if respondent is "Very Conservative"; ideology=2 if respondent is "Conservative"; ideology=3 if respondent is "Slightly Conservative"; ideology=4 if respondent is "Moderate"; ideology=5 if respondent is "Slightly Liberal"; ideology=6 if respondent is =="Liberal"; ideology_scale=7 if respondent" is Very Liberal"


*****Partisanship
*partisanship=1 if respondent is "Strongly Republican" = 1; partisanship=2 if respondent is "Weakly Republican"; partisanship=3 if respondent chooses "Lean Republican"; partisanship=4 if respondent is "Pure Independent"; partisanship=5 if respondent chooses "Lean Democrat"; partisanship=6 if respondent is "Weakly Democrat"; partisanship=7 if respondent is "Strongly Democrat".


*****Gender
*gender=1 if respondent is female; gender=2 if respondent is male 


*****Pride 
*pride=0 if subjects chose as response to question about pride in their country "Not proud at all" or "Not very proud"; pride=1 if subjects chose as response "Quite proud" or "Very proud".


*****Education
*education=1 if respondent's education level is "Less than high school"; education=2 if respondent's education level is "High school graduate"; education=3 if respondent's education level is "Some college, no degree"; education=4 if respondent's education level is "Associate's degree"; education=5 if respondent's education level is "Bachelor's degree"; education=6 if respondent's education level is "Graduate or advanced degree"; education=7 if respondent's education level is "Ph.D.".


*****Interest in current affairs
*interest=1 if respondent is "Not interested at all"; interest=2 if respondent is "Not interested"; interest=3 if respondent is "Somewhat interested"; interest=4 if respondent is "Very interested".


*****Age
*age=1 if respondent's age is between 18 and 24; age=2 if respondent's age is between 25 and 34; age=3 if respondent's age is between 35 and 44; age=4 if respondent's age is between 45 and 54; age=5 if respondent's age is between 55 and 64; age=6 if respondent's age is 65 or above.


*****Duration of survey
*durationinseconds=time (in seconds) taken by respondents to complete survey. 


*****Analysis reported in the article*****


*****FIGURES 1A and 1B
reg attribution i.own_country i.unclaimed own_country#unclaimed

margins, dydx(own_country) subpop(unclaimed)

marginsplot, title("", size(medlarge)) ytitle("Probability of attribution to SOF") scheme(s1mono) recast(scatter) ylabel(-0.4(0.1)0.4) yline(0) xlabel(,noticks)

margins, dydx(own_country) subpop(if unclaimed == 0)

marginsplot, title("", size(medlarge)) ytitle("Probability of attribution to SOF") xtitle("Unclaimed") scheme(s1mono) recast(scatter) ylabel(-0.4(0.1)0.4) yline(0) xlabel(,noticks)


*****TABLE 1
tabulate own_country, summarize(anger)

tabulate own_country, summarize(fear) 

tabulate own_country, summarize(resignation)

tabulate own_country, summarize(confusion)

tabulate own_country, summarize(indifference)

tabulate own_country, summarize(other)


*****TABLE 2
reg anger own_country

reg fear  own_country

reg resignation own_country

reg indifference own_country

reg confusion own_country

reg other own_country


*****FIGURE 2
medeff (regress anger own_country) (regress attribution own_country anger) if unclaimed==1, treat(own_country) mediate(anger) sims (1000)


*****Analysis reported in the appendix*****


***** TABLE A1
reg attribution i.own_country i.unclaimed own_country#unclaimed 


***** TABLE A2
ttest gender, by(own_country)

ttest ideology, by(own_country)

ttest partisanship, by(own_country)

ttest pride, by(own_country)

ttest age, by(own_country)

ttest education, by(own_country)

ttest interest, by(own_country)

ttest gender, by(unclaimed)

ttest ideology, by(unclaimed)

ttest partisanship, by(unclaimed)

ttest pride, by(unclaimed)

ttest age, by(unclaimed)

ttest education, by(unclaimed)

ttest interest, by(unclaimed)


***** TABLE A3
ttest durationinseconds, by(own_country)


***** TABLE A4
capture program drop bootmm
program bootmm, rclass
  syntax [if] [in]
  sureg (anger own_country)(confusion own_country)(attribution anger confusion own_country) `if' `in'
  return scalar indanger  = [anger]_b[own_country]*[attribution]_b[anger]
  return scalar indconfusion = [confusion]_b[own_country]*[attribution]_b[confusion]
  return scalar indtotal = [anger]_b[own_country]*[attribution]_b[anger]+[confusion]_b[own_country]*[attribution]_b[confusion] 
end

bootstrap r(indanger) r(indconfusion) r(indtotal), bca reps(5000): bootmm


***** FIGURE A1
reg attribution i.own_country i.unclaimed own_country#unclaimed gender
margins, dydx(own_country) over(unclaimed)

marginsplot, title("", size(medlarge)) ytitle("Probability of attribution to SOF") xtitle("Unclaimed") scheme(s1mono) recast(scatter) xscale(range(-0.5 1.5)) ylabel(-0.4(0.1)0.4) yline(0)


***** FIGURE A2
reg attribution i.own_country i.unclaimed own_country#unclaimed ideology
margins, dydx(own_country) over(unclaimed)

marginsplot, title("", size(medlarge)) ytitle("Probability of attribution to SOF") xtitle("Unclaimed") scheme(s1mono) recast(scatter) xscale(range(-0.5 1.5)) ylabel(-0.4(0.1)0.4) yline(0)


***** FIGURE A3
reg attribution i.own_country i.unclaimed own_country#unclaimed partisanship
margins, dydx(own_country) over(unclaimed)

marginsplot, title("", size(medlarge)) ytitle("Probability of attribution to SOF") xtitle("Unclaimed") scheme(s1mono) recast(scatter) xscale(range(-0.5 1.5)) ylabel(-0.4(0.1)0.4) yline(0)


***** FIGURE A4
reg attribution i.own_country i.unclaimed own_country#unclaimed pride
margins, dydx(own_country) over(unclaimed)

marginsplot, title("", size(medlarge)) ytitle("Probability of attribution to SOF") xtitle("Unclaimed") scheme(s1mono) recast(scatter) xscale(range(-0.5 1.5)) ylabel(-0.4(0.1)0.4) yline(0)


***** FIGURE A5
reg attribution i.own_country i.unclaimed own_country#unclaimed age
margins, dydx(own_country) over(unclaimed)

marginsplot, title("", size(medlarge)) ytitle("Probability of attribution to SOF") xtitle("Unclaimed") scheme(s1mono) recast(scatter) xscale(range(-0.5 1.5)) ylabel(-0.4(0.1)0.4) yline(0)


***** FIGURE A6
reg attribution i.own_country i.unclaimed own_country#unclaimed education
margins, dydx(own_country) over(unclaimed)

marginsplot, title("", size(medlarge)) ytitle("Probability of attribution to SOF") xtitle("Unclaimed") scheme(s1mono) recast(scatter) xscale(range(-0.5 1.5)) ylabel(-0.4(0.1)0.4) yline(0)


***** FIGURE A7
reg attribution i.own_country i.unclaimed own_country#unclaimed interest
margins, dydx(own_country) over(unclaimed)

marginsplot, title("", size(medlarge)) ytitle("Probability of attribution to SOF") xtitle("Unclaimed") scheme(s1mono) recast(scatter) xscale(range(-0.5 1.5)) ylabel(-0.4(0.1)0.4) yline(0)


***** FIGURE A8
reg attribution i.own_country i.unclaimed own_country#unclaimed durationinseconds
margins, dydx(own_country) over(unclaimed)

marginsplot, title("", size(medlarge)) ytitle("Probability of attribution to SOF") xtitle("Unclaimed") scheme(s1mono) recast(scatter) xscale(range(-0.5 1.5)) ylabel(-0.4(0.1)0.4) yline(0)


***** FIGURE A9
reg attribution i.own_country i.unclaimed own_country#unclaimed gender ideology partisanship pride age education interest durationinseconds
margins, dydx(own_country) over(unclaimed)

marginsplot, title("", size(medlarge)) ytitle("Probability of attribution to SOF") xtitle("Unclaimed") scheme(s1mono) recast(scatter) xscale(range(-0.5 1.5)) ylabel(-0.4(0.1)0.4) yline(0)


***** FIGURE A10
medeff (regress anger own_country) (regress attribution own_country anger) if unclaimed==1, treat(own_country) mediate(anger) sims (1000)
medeff (regress anger own_country) (regress attribution own_country anger) if unclaimed==0, treat(own_country) mediate(anger) sims (1000)


***** FIGURE A11
medeff (regress fear own_country) (regress attribution own_country fear) if unclaimed==1, treat(own_country) mediate(fear) sims (1000)
medeff (regress fear own_country) (regress attribution own_country fear) if unclaimed==0, treat(own_country) mediate(fear) sims (1000)


***** FIGURE A12
medeff (regress resignation own_country) (regress attribution own_country resignation) if unclaimed==1, treat(own_country) mediate(resignation) sims (1000)
medeff (regress resignation own_country) (regress attribution own_country resignation) if unclaimed==0, treat(own_country) mediate(resignation) sims (1000)


***** FIGURE A13
medeff (regress confusion own_country) (regress attribution own_country confusion) if unclaimed==1, treat(own_country) mediate(confusion) sims (1000)
medeff (regress confusion own_country) (regress attribution own_country confusion) if unclaimed==0, treat(own_country) mediate(confusion) sims (1000)


***** FIGURE A14
medeff (regress indifference own_country) (regress attribution own_country indifference) if unclaimed==1, treat(own_country) mediate(indifference) sims (1000)
medeff (regress indifference own_country) (regress attribution own_country indifference) if unclaimed==0, treat(own_country) mediate(indifference) sims (1000)


***** FIGURE A15
medeff (regress other own_country) (regress attribution own_country other) if unclaimed==1, treat(own_country) mediate(other) sims (1000)
medeff (regress other own_country) (regress attribution own_country other) if unclaimed==0, treat(own_country) mediate(other) sims (1000)


***** FIGURE A16
medeff (regress anger own_country gender) (regress attribution own_country anger gender) if unclaimed==1, treat(own_country) mediate(anger) sims (1000)
medeff (regress anger own_country gender) (regress attribution own_country anger gender) if unclaimed==0, treat(own_country) mediate(anger) sims (1000)


***** FIGURE A17 
medeff (regress anger own_country ideology) (regress attribution own_country anger ideology) if unclaimed==1, treat(own_country) mediate(anger) sims (1000)
medeff (regress anger own_country ideology) (regress attribution own_country anger ideology) if unclaimed==0, treat(own_country) mediate(anger) sims (1000)


***** FIGURE A18
medeff (regress anger own_country partisanship) (regress attribution own_country anger partisanship) if unclaimed==1, treat(own_country) mediate(anger) sims (1000)
medeff (regress anger own_country partisanship) (regress attribution own_country anger partisanship) if unclaimed==0, treat(own_country) mediate(anger) sims (1000)


***** FIGURE A19
medeff (regress anger own_country pride) (regress attribution own_country anger pride) if unclaimed==1, treat(own_country) mediate(anger) sims (1000)
medeff (regress anger own_country pride) (regress attribution own_country anger pride) if unclaimed==0, treat(own_country) mediate(anger) sims (1000)


***** FIGURE A20
medeff (regress anger own_country age) (regress attribution own_country anger age) if unclaimed==1, treat(own_country) mediate(anger) sims (1000)
medeff (regress anger own_country age) (regress attribution own_country anger age) if unclaimed==0, treat(own_country) mediate(anger) sims (1000)


***** FIGURE A21
medeff (regress anger own_country education) (regress attribution own_country anger education) if unclaimed==1, treat(own_country) mediate(anger) sims (1000)
medeff (regress anger own_country education) (regress attribution own_country anger education) if unclaimed==0, treat(own_country) mediate(anger) sims (1000)


***** FIGURE A22
medeff (regress anger own_country interest) (regress attribution own_country anger interest) if unclaimed==1, treat(own_country) mediate(anger) sims (1000)
medeff (regress anger own_country interest) (regress attribution own_country anger interest) if unclaimed==0, treat(own_country) mediate(anger) sims (1000)


***** FIGURE A23
medeff (regress anger own_country durationinseconds) (regress attribution own_country anger durationinseconds) if unclaimed==1, treat(own_country) mediate(anger) sims (1000)
medeff (regress anger own_country durationinseconds) (regress attribution own_country anger durationinseconds) if unclaimed==0, treat(own_country) mediate(anger) sims (1000)


***** FIGURE A24
medeff (regress anger own_country interest age gender education pride ideology partisanship durationinseconds) (regress attribution own_country anger interest age gender education pride ideology partisanship durationinseconds) if unclaimed==1, treat(own_country) mediate(anger) sims (1000)
medeff (regress anger own_country interest age gender education pride ideology partisanship durationinseconds) (regress attribution own_country anger interest age gender education pride ideology partisanship durationinseconds) if unclaimed==0, treat(own_country) mediate(anger) sims (1000)


***** FIGURE A25
medeff (regress anger own_country) (regress attribution own_country anger) if unclaimed==1 & other != 1, treat(own_country) mediate(anger) sims (1000)
medeff (regress anger own_country) (regress attribution own_country anger) if unclaimed==0 & other != 1, treat(own_country) mediate(anger) sims (1000)


***** FIGURE A26
medeff (regress anger own_country) (regress attribution own_country anger) if unclaimed==1 & (other != 1 | other == 1 & confusion_alt == 1), treat(own_country) mediate(anger) sims (1000)
medeff (regress anger own_country) (regress attribution own_country anger) if unclaimed==0 & (other != 1 | other == 1 & confusion_alt == 1), treat(own_country) mediate(anger) sims (1000)

